package com.lagou.edu.mvcframwork.pojo;

import java.lang.reflect.Method;
import java.util.Map;
import java.util.regex.Pattern;

public class Handler {

    //对应的类
    private Object controller;

    private Method method;

    private Pattern requestMappingValue;

    //参数顺序
    private Map<String,Integer> paramIndexMapping;

    public Handler(Object controller, Method method, Pattern requestMappingValue, Map<String,Integer> paramIndexMapping) {
        this.controller = controller;
        this.method = method;
        this.requestMappingValue = requestMappingValue;
        this.paramIndexMapping = paramIndexMapping;
    }

    public Handler() {
    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Pattern getRequestMappingValue() {
        return requestMappingValue;
    }

    public void setRequestMappingValue(Pattern requestMappingValue) {
        this.requestMappingValue = requestMappingValue;
    }

    public Map<String, Integer> getParamIndexMapping() {
        return paramIndexMapping;
    }

    public void setParamIndexMapping(Map<String,Integer> paramIndexMapping) {
        this.paramIndexMapping = paramIndexMapping;
    }
}
